<!--
 * @Author: cgl
 * @Date: 2023-06-19 10:06:51
 * @LastEditors: cgl
 * @LastEditTime: 2023-09-18 11:35:44
 * @FilePath: \public-health-emergencies-fed:\新放射\新radiation-hygiene-fe\src\views\slide\components\basicIndex.vue
 * @Description:
 *
 * Copyright (c) 2023 by cgl/微盛信息产业有限公司, All Rights Reserved.
-->
<template>
  <div class="container">
    <div v-if="comp">
      <component :is="comp" :basicForm="basicForm" :lrstatus="lrstatus"></component>
    </div>
  </div>
</template>

<script>
// import basicTable01  from "./basicTable/basicTable01";
// import basicTable05  from "./basicTable/basicTable05";
// import basicTable06  from "./basicTable/basicTable06";
// import basicTable09  from "./basicTable/basicTable09";
// import basicTable11  from "./basicTable/basicTable11";
// import basicTable12  from "./basicTable/basicTable12";
// import basicTable20  from "./basicTable/basicTable20";
// import basicTable21  from "./basicTable/basicTable21";
// import basicTable22  from "./basicTable/basicTable22";
// import basicTable40  from "./basicTable/basicTable40";
// import basicTable41  from "./basicTable/basicTable41";
// import basicTable42  from "./basicTable/basicTable42";
// import basicTable43  from "./basicTable/basicTable43";
// import basicTable50  from "./basicTable/basicTable50";
// import basicTable60  from "./basicTable/basicTable60";

export default {
  name: "basicIndex",
	components: {
		// basicTable01,
		// basicTable05,
		// basicTable06,
		// basicTable09,
		// basicTable11,
		// basicTable12,
		// basicTable20,
		// basicTable21,
		// basicTable22,
		// basicTable40,
		// basicTable41,
		// basicTable42,
		// basicTable43,
		// basicTable50,
		// basicTable60,
	},
  data() {
    return {
      comp:null,
    };
  },
  props: {
		// 基本信息数据
    basicForm: {
			type: Object,
      default: () => {
				return {}
			},
    },
		// 状态
    lrstatus: {
			type: String,
      default: "",
    },
  },
  created() {
    let value = this.basicForm.basicInfoCode;
    if(value){
      if(value == '51'){
        value = "50";
      }
      this.comp = resolve => require.ensure([], () => resolve(require(`@/views/slide/components/basicTable/basicTable${value}`)));
    }
  },
	watch: {
    "basicForm.basicInfoCode":{
      handler(val){
        let value = val
        if(value){
          if(value == '51'){
            value = "50";
          }
          this.comp = resolve => require.ensure([], () => resolve(require(`@/views/slide/components/basicTable/basicTable${value}`)));
        }
      }
    },
    'comp':{
      handler(value){
        setTimeout(() => {
          this.$emit('updateSuccess')
        }, 1000)
      }
    }
	},
  methods: {
  },
};
</script>

<style lang="scss" scoped>
@import './content.scss';
</style>
